import { Component } from "~/utils/enums"
import * as c from "~/utils/components"
import BaseForm from "@admin/entity/base/BaseForm"

export default class Dict extends BaseForm {
    dictId = ''
	dictName = ''
	dictType = ''
	status = ''
	remark = ''
	
    clear(): void {
        this.setForm(new Dict(this.opts))
        this.resetFields()
    }
    
	getDictName(): c.Input {
        return {
            type: Component.Input,
            label: '字典名称',
			mode: ['query'],
			element: {
				maxlength: 20,
			}
        }
    }

	getDictType(): c.Input {
        return {
            type: Component.Input,
            label: '字典类型',
			mode: ['query'],
			element: {
				maxlength: 20,
			}
        }
    }

	getStatus(): c.Radio {
        return {
            type: Component.Radio,
            label: '状态',
            config: {
                dict: 'sys_normal_disable'
            }
        }
    }

	getRemark(): c.Textarea {
        return {
            type: Component.Textarea,
            label: '备注',
        }
    }
}
